import Vue from 'vue'
import Router from 'vue-router'
import Login from '@/components/login/login.vue'
import Home from '@/components/home/home.vue'
import Main from '@/components/main/main.vue'
import TrackDataList from '@/components/trackdatalist/trackdatalist.vue'
import TrackDataLine from '@/components/trackdataline/trackdataline.vue'
import WaveMatch from '@/components/wavematch/wavematch.vue'
import Settlement from '@/components/settlement/settlement.vue'
import Anomaly from '@/components/anomaly/anomaly.vue'
import Sensor from '@/components/sensor/sensor.vue'
import User from '@/components/user/user.vue'
import Log from '@/components/log/log.vue'

Vue.use(Router)

export default new Router({
  routes: [
    {
      name: 'login',
      path: '/login',
      component: Login
    },
    {
      name: 'home',
      path: '/',
      component: Home,
      // redirect: '/main',
      redirect: {name: 'main'},
      children:[
        {
          name: 'main',
          path: '/main',
          component: Main
        },{
          name: 'trackdatalist',
          path: '/trackdatalist',
          component: TrackDataList
        },{
          name: 'trackdataline',
          path: '/trackdataline',
          component: TrackDataLine
        },{
          name: 'wavematch',
          path: '/wavematch',
          component: WaveMatch
        },{
          name: 'settlement',
          path: '/settlement',
          component: Settlement
        },{
          name: 'anomaly',
          path: '/anomaly',
          component: Anomaly
        },{
          name: 'sensor',
          path: '/sensor',
          component: Sensor
        },{
          name: 'user',
          path: '/user',
          component: User
        },{
          name: 'log',
          path: '/log',
          component: Log
        }
      ]
    }
  ]
})
